#pragma once

#include <qbprotocol/include/SSQBModel.h>

#include <mutex>
#include <string>

#include "bondlib.h"

class S_BONDLIB_EXPORT CABBondPriceInfo {
 public:
  static CABBondPriceInfo& instance();

  void Clear();
  void UpdateData(xQBAbBondRecommendPriceAck_t* pData);
  const char* GetPrice(int bondIndex);
  unsigned int GetVersion();

 private:
  CABBondPriceInfo();
  ~CABBondPriceInfo();

 protected:
  std::map<int, std::string> m_data;  // bondIndex, price
  // std::map<int, double>			m_data; //bondIndex, price
  unsigned int m_version;
  std::mutex m_mutex;
};
